package gitlab_hook

import "atomgit.com/openlinksaas-org/proto-gen-go.git/events/events_gitlab"

type WikiHook struct {
	ObjectKind       string           `json:"object_kind"`
	User             User             `json:"user"`
	Project          Project          `json:"project"`
	Wiki             Wiki             `json:"wiki"`
	ObjectAttributes ObjectAttributes `json:"object_attributes"`
}

func (item *WikiHook) ToProtoBuf() *events_gitlab.WikiEvent {
	return &events_gitlab.WikiEvent{
		ObjectKind:       item.ObjectKind,
		User:             item.User.ToProtoBuf(),
		Project:          item.Project.ToProtoBuf(),
		Wiki:             item.Wiki.ToProtoBuf(),
		ObjectAttributes: item.ObjectAttributes.ToProtoBuf(),
	}
}
